﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyabpDDD.Demo.Application.ChargeablemanagementLY;
using MyabpDDD.Demo.Application.ChargeablemanagementLY.Dto;
using MyabpDDD.Demo.Application.yingSHow;
using MyCompany.MyProject.Models;
using System;
using System.Threading.Tasks;

namespace MyabpDDD.Api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class YinfuController : ControllerBase
    {
        private static readonly string[] Summaries = new[]
        {
            "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
        };
        
        private readonly IYinshowService _service1;
        private readonly IChargeablemanagementLYService _service;
        public YinfuController(IChargeablemanagementLYService service, IYinshowService yinshowService)
        {
            this._service = service;
            this._service1 = yinshowService;
        }
        [HttpGet]
        //public ActionResult QueryStudentAll()
        //{
        //    var list = _service.QueryStudentAll();
        //    return Ok(list);
        //}
        [HttpGet]
        public async Task Delete(int id)
        {
            await _service.Delete(id);
        }
        [HttpPost]
        public async Task<Chargeablemanagement> Inser(ChargeablemanagementLYDto dto)
        {
             
            return await _service.Inser(dto);
        }
        [HttpGet]
        public ActionResult Get(int id)
        {
            return Ok(_service.Get(id));
        }
        [HttpGet]
        public ActionResult SelectDel(string ids)
        {
            return Ok(_service.SelectDel(ids));
        }
        [HttpGet]
        public ActionResult QueryStudentAll1(int pageIndex, int pageSize, string huozhudanwei, int? zhuangtai, string jinbanren, DateTime? date, int? jiesuan)
        {
            var list = _service1.QueryStudentAll(pageIndex, pageSize,huozhudanwei,zhuangtai,jinbanren,date,jiesuan);
            return Ok(list);
        }
        [HttpGet]
        public ActionResult SelectDe7l(string ids)
        {
            return Ok(_service1.SelectDel(ids));
        }
    }
}
